package lab02.test03;

public class Student {
    //属性
    float computerScore;
    float mathScore;
    float englishScore;
    //行为
    float sum(){
        return computerScore+mathScore+englishScore;
    }

    float average(){
        return (computerScore+mathScore+englishScore)/3;
    }

    float maxScore(){
        float maxScore=computerScore>mathScore?computerScore:mathScore;
        maxScore=maxScore>englishScore?maxScore:englishScore;
        return maxScore;

    }
    float  minScore(){
        float minScore=computerScore<mathScore?computerScore:mathScore;
        minScore=minScore<englishScore?minScore:englishScore;
        return minScore;
    }
    //打印
    void printStudent(){
        System.out.println(sum());
        System.out.println(average());
        System.out.println(maxScore());
        System.out.println(minScore());

    }
}
